package com.iot.ammeter.responseResult;

/**
 * @ClassName: ResponseState
 * @Author: Basil
 * @Date: 2021/9/26 下午2:15
 * @Version: 1.0
 * @Description: 定义常用状态码
 **/
public enum ResponseState {
    FAILED("400", "操作失败", false),
    SUCCESS("200", "操作成功", true),
    SYSTEM_ERROR("-99999", "系统异常", true),
    NOT_LOGIN("401","未登录",false),
    NOT_PERMISSION("403","无权操作",false);
    ;
    private String code;
    private String message;
    private boolean success;

    ResponseState(String code, String message, boolean success) {
        this.code = code;
        this.message = message;
        this.success = success;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }
}
